package main

import "fmt"

func printMap1(cityMap map[string]string) {
	for k, v := range cityMap {
		fmt.Println("k = ", k, "v = ", v)
	}
}

func main() {
	cityMap := make(map[string]string)
	cityMap["新青年"] = "新起点"
	cityMap["1"] = "好"
	cityMap["2"] = "很好"
	cityMap["3"] = "非常好"
	fmt.Println(cityMap)
	fmt.Println("------ for -------")
	for s := range cityMap {
		fmt.Println("key = ", s)
	}
	fmt.Println("------ forr -------")
	for k, v := range cityMap {
		fmt.Println("k = ", k, "v = ", v)
	}
	fmt.Println("------------------")
	for _, s2 := range cityMap {
		fmt.Println(s2)
	}
	fmt.Println("------------------")
	for s, _ := range cityMap {
		fmt.Println(s)
	}
	fmt.Println("-----------------")
	delete(cityMap, "1")
	fmt.Println(cityMap)

	printMap1(cityMap)
	cityMap["2"] = "千羽"
	fmt.Println(cityMap)

}
